# 来创建一个TCP协议下的socket对象
# socket.AF_INET: intenet间通讯
# socket.SOCK_STREAM: tcp/ip协议

import socket



# 创建socket对象 socket.AF_INET: intenet间通讯, socket.SOCK_STREAM: tcp/ip协议
tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print('tcp_socket-->', tcp_socket)

# tcp_socket--> <socket.socket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('0.0.0.0', 0)>